int a=5214,b,c,d,e;
b=a/1000;
c=a%1000/100;
d=a%100/10;
e=a%10;
System.out.println(b+"\n"+c+"\n"+d+"\n"+e+"\n");
